#ifndef NETBUFFEREDEVENT_H
#define NETBUFFEREDEVENT_H

#include "netevent.h"

#define NET_BUFFER_DEFAULT_SIZE     1024*4

class NetBufferedEvent : public NetEvent
{
public:
    NetBufferedEvent(Type type);
    ~NetBufferedEvent();

    char *data();

    size_t length();

    size_t dataLength();

    void setData(const char *data, size_t size);

protected:
    char m_data[NET_BUFFER_DEFAULT_SIZE];

    size_t m_current;
};

#endif // NETBUFFEREDEVENT_H
